<?php
/**
 * Created by PhpStorm.
 * User: sujianyong
 * Email: 360164460@qq.com
 * DateTime: 2022/6/11 13:27
 * Type：
 */
namespace app\canteen\admin;
use app\admin\controller\Admin;
use app\common\model\StUser as StUserModel;
use app\common\model\Template as TemplateModel;
use think\Db;
use think\facade\Config;
use think\facade\Cookie;
use think\facade\Env;
use util\File;

class Base extends Admin
{
    protected $company_id;
    static $cardType = ['FC'=>'消费卡','CC'=>'次数卡'];

    //获取用户;
    static function getStUser($id=null){
        $data = StUserModel::where(['status'=>1,'comid'=>COMID,'delete_time'=>0])->column('user_name','id');
        if ($id){$data= $data[$id];}
        return $data;
    }


    /**
     * @return mixed
     */
    public function getTemplate()
    {
        $template = TemplateModel::where(['status'=>1,'tag'=>'html'])->column('title','name');
        return $template;
    }

}